package com.ericsson.enap.modules.cmdkpi.job;

import com.ericsson.common.quartz.job.MainJob;
import com.ericsson.common.quartz.job.ManualQuartzJob;
import com.ericsson.common.quartz.service.QuartzTableManager;
import com.ericsson.enap.modules.cmdkpi.task.CmdKpiTask;
import com.jcraft.enipjsch.ChannelExec;
import com.jcraft.enipjsch.JSch;
import com.jcraft.enipjsch.Session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @description: 命令式kpi指标采集
 * @author: chenhongbo
 * @create: 2021-09-02 10:40
 */
@Component
public class CmdKpiJob implements MainJob {
    @Autowired
    QuartzTableManager quartzTableManager;
    String jobName="cmdKpiJob";
    @Autowired
    CmdKpiTask cmdKpiTask;
    @Override
    public void doTask() {
        System.out.println("CmdKpiJob start.....");
        //cmdKpiTask.execute();

        quartzTableManager.addManualTaskJob(jobName,jobName,jobName,jobName, ManualQuartzJob.class,"0 3/5 * * * ?",cmdKpiTask);
    }
}
